package com.lap.context.starter.autoconfigure;

import com.lap.context.starter.core.helper.MessageHelper;
import com.lap.context.starter.core.helper.SpringHelper;
import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.autoconfigure.AutoConfiguration;
import org.springframework.context.MessageSource;
import org.springframework.context.annotation.Bean;

@Slf4j
@AutoConfiguration
public class HelperAutoConfiguration {

  @Bean
  MessageHelper messageHelper(MessageSource messageSource) {
    log.info("Initializer context Lap MessageHelper >>:{}", messageSource);
    return new MessageHelper(messageSource);
  }

  @Bean
  SpringHelper springHelper() {
    log.info("Initializer context Lap SpringHelper");
    return new SpringHelper();
  }
}
